<extend name="Layout::news"/>
<block name="content">
    <div class="layout-content">

        <div class="page-title">公告管理</div>

        <div class="content-top">
            <ul class="top-nav">
                <li class="active"><span>添加信息</span></li>
            </ul>
            <div class="clearfix"></div>
        </div>
        <div class="clearfix"></div>
        <!--content-main start-->
        <div class="container-fluid content-main">
            <div class="row">
                <div class="col-md-12">
                    <div id="tsk" class="ui-tips bg-info" style="display:none">
                        <span class="icon glyphicon glyphicon-info-sign"></span> <span
                            id="ts">提示信息提示信息提示信息提示信息提示信息提示信息。</span>
                    </div>

                    <form class="form-horizontal" action="{:U('News/doCreate')}" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">标题</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control js-title" name="title"/>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">作者</label>
                            <div class="col-sm-5">
                                <input type="text" value="{$list['editor']}" name="editor" class="form-control js-editor"/>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">标签</label>
                            <div class="col-sm-5">
                                <select class="form-control js-cate" name="news_cate">
                                    <foreach name="cates" item="cate">
                                        <option data-area="{$cate.id}" value="{$cate.id}" >{$cate.name}</option>
                                    </foreach>
                                </select>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">摘要</label>
                            <div class="col-sm-2">
                                <textarea maxlength="200" placeholder="最多两百个字符" style="width:400px; " name="abstract"></textarea>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">文章内容</label>
                            <div class="col-sm-5">
                                <script id="content" name="content" type="text/plain" style="width:400px;height:100px;"></script>
                                    <script type="text/javascript">
                                        window.UEDITOR_HOME_URL = "__PUBLIC__/static/utf8-php/";
                                    </script>
                                    <script type="text/javascript">
                                        var ue = UE.getEditor('content');
                                    </script>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">展位图片</label>
                            <div class="col-sm-8">
                                <input type="file" name="pic">
                                <span class="help-block">只能上传 <b>"jpg","png","jpeg"</b> 格式的图片</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否置顶</label>
                            <div class="col-sm-2">
                                是<input type="radio" name="stick" value="10" checked >
                                否<input type="radio" name="stick" value="30" >
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否显示</label>
                            <div class="col-sm-2">
                                是<input type="radio" name="status"  value="10" checked >
                                否<input type="radio" name="status" value="30">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-8">
                                <button style="width: 150px" type="submit"
                                        class="btn btn-default">保存
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <!--content-main end-->
    </div>


</block>
